﻿@model _PLATFORM.DATA.SELECTION_OPTION

@{
    ViewBag.Title = "Create";
}

<div style="color:Red;">@ViewBag.Message</div>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

    <div id="subNav">
        <ul>
    	    <li>@Html.ActionLink("Systems Management", "IndexList", "TruckingSystem")</li>
            @if(ViewBag.ProductType == "Component"){
                <li class="select">@Html.ActionLink("Component Management", "Index", "Component", new { productType = "Component" }, null)</li>
                <li>@Html.ActionLink("Spare Part Management", "Index", "Component", new { productType = "SparePart" }, null)</li>            
            }
            else{
                <li>@Html.ActionLink("Component Management", "Index", "Component", new { productType = "Component" }, null)</li>
                <li class="select">@Html.ActionLink("Spare Part Management", "Index", "Component", new { productType = "SparePart" }, null)</li>
            }
        </ul>
    </div>
    
    @if (ViewBag.ProductType == "Component")
    {
        <br /><h2>Component Management</h2>
    }
    else { 
        <br /><h2>Spare Part Management</h2>
    }

    <div id="subNav2">
        @if (ViewBag.ProductType == "Component")
        {
            <ul>
    	        <li>@Html.ActionLink("Current Components", "Index", "Component", new { productType = "Component" }, null)</li>
                <li>@Html.ActionLink("Create New Component", "Create", "Component", new { productType = "Component" }, null)<img src="../../Assets/images/add_icon.gif" alt="Add" /></li>
                <li>@Html.ActionLink("Manage Component Selections", "Index", "SelectionOption", new { productType = "Component" }, null)</li>
                <li class="select"><a href="#">Create New Selection Option</a></li>
            </ul>
        }
        else
        {
            <ul>
    	        <li>@Html.ActionLink("Current Spare Parts", "Index", "Component", new { productType = "SparePart" }, null)</li>
                <li>@Html.ActionLink("Create New Spare Part", "Create", "Component", new { productType = "SparePart" }, null)<img src="../../Assets/images/add_icon.gif" alt="Add" /></li>
                <li>@Html.ActionLink("Manage Spare Part Selections", "Index", "SelectionOption", new { productType = "SparePart" }, null)</li>
                <li class="select"><a href="#">Create New Selection Option</a></li>
            </ul>
        }
    </div>
    
    <div id="lowerContainer">
        <div id="lowerContainerInner">
            <div style="overflow:visible;">

@using (Html.BeginForm("Create", "SelectionOption", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
    @Html.ValidationSummary(true)
    <fieldset>  
    <table class="sparePartMgmt" cellpadding="5">
        <tr>
            <td style="text-align:left; vertical-align:top;">
                <div class="title">
                	Create New Grouping Option
                </div>
                <div class="padding">
                    
                        
                        <div class="editor-label">
                            @Html.Label("GROUP")
                        </div>
                        <div class="editor-field">
                            @Html.DropDownList("GroupList")
                        </div>

                        <div class="editor-label">
                            @Html.LabelFor(model => model.NAME)
                        </div>
                        <div class="editor-field">
                            @Html.EditorFor(model => model.NAME)
                            @Html.ValidationMessageFor(model => model.NAME)
                        </div>

                        <div class="editor-label">
                            @Html.LabelFor(model => model.IMAGE)
                        </div>
                        <div class="editor-field">
                            @*@Html.EditorFor(model => model.IMAGE)
                            @Html.ValidationMessageFor(model => model.IMAGE)*@
                            <input name="img_imageUpload" type="file" id="imageUpload" value="Upload" />
                        </div>
                        <br style="clear:both;" /><br style="clear:both;" />
                        <p>
                            <input type="submit" value="Save" class="button default btnLarge" />
                        </p>
                    
                </div>
            </td>
        </tr>
    </table>
    </fieldset>
}
            </div>
        </div>
    </div>
